package com.awesome.spring.controller;


import com.awesome.spring.service.IArticlesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Alex Wu
 * @since 2025-01-23
 */
@RestController
@RequestMapping("/articles")
public class ArticlesController {

    @Autowired
    private IArticlesService articlesService;

    @GetMapping("/count")
    public Long getArticles() {
        return articlesService.count();
    }

}
